<div class="m-hd">
  <div class="title">
    <h1>站内短信</h1>
    <div class="small">Member</div>
  </div>
  <div class="f-cb"></div>
</div>
<div class="m-tab">
	<div class="more"><a href="{$url|'member/Message/send'}">+ 写新消息</a></div>
  <ul>
    <li><a href="<?php echo url('member/Message/index'); ?>">收件箱</a></li>
    <li><a href="<?php echo url('member/Message/index',array('type'=>1)); ?>">系统消息</a></li>
    <li><a href="<?php echo url('member/Message/index',array('type'=>2)); ?>">发件箱</a></li>
  </ul>
</div>
<div class="f-sep10"></div>
<div class="m-form m-form-1">
    <form action="{$url|'member/Message/sendData'}" method="post" id="form">
      <fieldset>
        <div class="formitm">
          <label class="lab"> 收件人：</label>
          <div class="ipt">
            <input name="username" type="text" class="u-ipt u-ipt-5" value="{$_GET['username']}" maxlength="20" datatype="s5-250|e" sucmsg="用户名或邮箱验证通过！" nullmsg="请输入用户名或邮箱！"  errormsg="用户名至少5个字符或邮箱格式不正确！" />
            <span class="suffix">用户名或邮箱地址</span>
            <p></p>
          </div>
        </div>
        <div class="formitm">
          <label class="lab"> 标题：</label>
          <div class="ipt">
            <input name="title" type="text" class="u-ipt u-ipt-5" maxlength="250" datatype="s3-250" sucmsg="标题验证通过！" nullmsg="请输入标题！"  errormsg="标题至少3个字符！" id="title"  />
            <span class="suffix"></span>
            <p></p>
          </div>
        </div>
        <div class="formitm">
          <label class="lab"> 内容：</label>
          <div class="ipt">
            <textarea name="content" class="u-tta u-tta-5" datatype="*" sucmsg="内容验证通过！" nullmsg="请输入内容！" errormsg="内容未填写！" id="content"></textarea>
            <span class="suffix"></span>
            <p></p>
          </div>
        </div>
        <div class="formitm">
          <label class="lab"> 验证码：</label>
          <div class="ipt">
            <input name="verify" type="text" class="u-ipt u-ipt-1" maxlength="250" datatype="n4-4" sucmsg="验证码格式正确！" nullmsg="请输入验证码！"  errormsg="验证码输入不正确！"  /> 
            <span class="suffix"> <a href="javascript:;" id="verify"> <img src="{$url|'member/Register/verify'}" width="55" height="26" /> 刷新验证码</a></span>
            <p></p>
          </div>
        </div>
        <div class="formitm formitm-1">
          <button class="u-btn s-btn-c3" type="submit">确认发送</button>
          <span class="status" id="status"></span> </div>
      </fieldset>
    </form>
    <div class="f-cb"></div>
  </div>
<script>
Do.ready('base','form','dialog',function() {
	$('#verify').click(function() {
		$('#verify').find('img').attr('src','{$url|"member/Register/verify"}&'+Math.random());
    });
	$('#form').duxForm({
		returnUrl:"<?php echo url('member/Message/index',array('type'=>2)); ?>"
		});
});
</script>